var scrollableframe;
function loaded() {
    scrollableframe = new iScroll('scrollableframe',
                          { useTransition:false,
                            checkDOMChanges: true,
                            hideScrollbar: true,
                            fixedScrollbar:true,
                            bounceLock: true,
                            onBeforeScrollStart: function (e) {
                                var target = e.target;
                                while (target.nodeType != 1) target = target.parentNode;

                                if (target.tagName != 'SELECT' && target.tagName != 'OPTION' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA' && target.tagName != 'BUTTON')
                                    e.preventDefault();
                            } }
                        );

    $('.button')
        .on('touchstart', function () {
            $(this).addClass('fake-active');
        })
        .on('touchend', function() {
            $(this).removeClass('fake-active');
        })
        .on('touchcancel', function() {
            $(this).removeClass('fake-active');
        });

    var allSelects = $('button');
    allSelects.each(function(index, item) {
                      item.addEventListener('touchstart', function(e) { /*e.stopPropagation();*/ $(this).addClass("fake-active"); }, false);
                      item.addEventListener('touchend', function(e) { $(this).removeClass("fake-active"); }, false);
                      item.addEventListener('touchcancel', function(e) { $(this).removeClass("fake-active"); }, false);
                    });
}

document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
// document.addEventListener('DOMContentLoaded', loaded, false);
loaded();